-- GENERATED SPELL FOR [Fallenroot Hellcaller] --


function spell0_4799(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(8129,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4799', 3000, 1)
end

function spell1_4799(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4799', 3000, 1)
end

function Sorts_4799(pUnit, Event)
local choix_sorts_4799 = math.random(0, 1)
if choix_sorts_4799 == 0 then
pUnit:RegisterEvent('spell0_4799', 1, 1)
end
if choix_sorts_4799 == 1 then
pUnit:RegisterEvent('spell1_4799', 1, 1)
end
end

function mob4799_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4799', math.random(1500, 3000), 1)
end

function mob4799_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4799_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4799_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4799, 1, 'mob4799_Action')
RegisterUnitEvent(4799, 2, 'mob4799_Leave')
RegisterUnitEvent(4799, 3, 'mob4799_Kill')
RegisterUnitEvent(4799, 4, 'mob4799_Die')
